package com.cloudsea.yunhaianalysis.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDate;
import java.util.List;

@Data
@Schema(description = "备餐预测报告的视图对象")
public class ForecastVO {

    @Schema(description = "预测的目标日期")
    private LocalDate forecastDate;

    @Schema(description = "目标日期的外部环境特征")
    private EnvironmentInfo environment;

    @Schema(description = "核心单品的备货建议列表")
    private List<ItemForecast> itemForecasts;

    @Data
    @Schema(description = "外部环境信息")
    public static class EnvironmentInfo {
        private String weather;
        private String temperature; // e.g., "18°C ~ 28°C"
        private String holidayInfo; // e.g., "周末" or "工作日"
    }

    @Data
    @Schema(description = "单个SKU的备货建议")
    public static class ItemForecast {
        private Long skuId;
        private String spuName;
        private String skuName;

        @Schema(description = "历史参考销量 (来自相似日)")
        private Integer baselineSales;

        @Schema(description = "最终建议备货量")
        private Integer suggestedQuantity;

        @Schema(description = "预测依据说明", example = "基于上周同日销量，因天气炎热上调15%")
        private String reason;
    }
}
